local skel = fk.CreateSkill {
  name = "lb__hanming",
}

Fk:loadTranslationTable {
  ["lb__hanming"] = "酣酩",
  [":lb__hanming"] = "出牌阶段，你可以指定一名本回合未以此指定过的角色，其视为使用一张【酒】并可以使用一张牌；若其未使用，你弃置一张牌且本回合此技能失效。",

  ["#lb__hanming"] = "酣酩：你可以令一名角色视为使用一张【酒】，然后其可以使用一张牌",
  ["#lb__hanming-ask"] = "酣酩：你可以使用一张牌",

  ["$lb__hanming1"] = "调剂一下。",
  ["$lb__hanming2"] = "生活就是如此美妙。",
}

skel:addEffect("active", {
  prompt = "#lb__hanming",
  anim_type = "support",
  target_num = 1,
  can_use = function(self, player)
    return player.phase == Player.Play
  end,
  card_filter = Util.FalseFunc,
  min_target_num = 1,
  target_filter = function(self, player, to_select, selected, selected_cards)
    return #selected == 0 and not table.contains(player:getTableMark("lb__hanming-turn"), to_select.id)
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local t = effect.tos[1]
    room:addTableMark(player, "lb__hanming-turn", t.id)
    if not (room:useVirtualCard("analeptic", nil, t, t, skel.name, true) and room:askToPlayCard(t, { skill_name = skel.name, prompt = "#lb__hanming-ask" })) then
      room:askToDiscard(player, {
        min_num = 1,
        max_num = 1,
        skill_name = skel.name,
        include_equip = true,
        cancelable = false,
      })
      room:invalidateSkill(player, skel.name, "-turn")
    end
  end,
})

return skel
